<extend name="Public/layout"/>

<block name="body">
    <form action="__SELF__" method="post" class="form">
        <div class="form-group">
            <label class="item-label">内容模型<span class="check-tips">（内容模型）</span></label>
            <div class="controls">
                <select name="model" class="form-control">
                    <option value=''>请选择模型：</option>
                    <volist name="all_model" id="model">
                        <option value="{$model.id}" 
                            <php>if($model['id'] == $info['model']) echo 'selected="selected"';</php> >
                            {$model.title}
                        </option>
                    </volist>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="item-label">文档ID<span class="check-tips">（文档ID）</span></label>
            <div class="controls">
                <input type="text" class="form-control" name="doc_id" value="{$info.doc_id|default=''}">
            </div>
        </div>
        <div class="form-group">
            <label class="item-label">评论内容<span class="check-tips">（评论内容）</span></label>
            <div class="controls">
                <textarea class="form-control" name="content">{$info.content|default=''}</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="item-label">父评论ID<span class="check-tips">（父评论ID）</span></label>
            <div class="controls">
                <input type="text" class="form-control" name="pid" value="{$info.sort|default=0}">
            </div>
        </div>
        <div class="form-group">
            <label class="item-label">排序<span class="check-tips">（用于显示的顺序）</span></label>
            <div class="controls">
                <input type="text" class="form-control" name="sort" value="{$info.sort|default=0}">
            </div>
        </div>
        <div class="form-group">
            <input type="hidden" name="id" value="{$info.id|default=''}">
            <button class="btn btn-primary submit ajax-post" type="submit" target-form="form">确 定</button>
            <button class="btn return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>
